package behavior.Command;


/**
 * Created by LYJ on 2016/10/20.
 * 请求这角色（由按键扮演）
 */
public class Keypad {
    private Command playCommand;
    private Command rewindCommand;
    private Command stopCommand;

    public void setPlayCommand(Command playCommand) {
        this.playCommand = playCommand;
    }

    public void setRewindCommand(Command rewindCommand) {
        this.rewindCommand = rewindCommand;
    }

    public void setStopCommand(Command stopCommand) {
        this.stopCommand = stopCommand;
    }
    public void play(){
        playCommand.excute();
    }
    public void rewind(){
        rewindCommand.excute();
    }
    public void stop(){
        stopCommand.excute();
    }
}
